package flags

import (
	"KumquatDrivesServices/global"
	"KumquatDrivesServices/model"
	"github.com/sirupsen/logrus"
)

func Makemigrations() {
	err := global.DB.AutoMigrate(
		&model.UserModel{},
		&model.FileModel{},
		&model.ShareModel{},
	)
	if err != nil {
		logrus.Fatalf("数据库迁移失败: %v", err)
		return
	}
	logrus.Info("数据库迁移成功")
}
